package com.zjw.algorithm.test;

import com.zjw.algorithm.ref.ARefCount;
import com.zjw.algorithm.ref.RefCount;

public class T2 {
    public static void main(String[] args) {
        RefCount<Object> refCount = new ARefCount<>(new Object(), o -> System.out.println("release " + o));

        System.out.println(refCount.getOrNull());

        refCount.release();
    }
}
